/**
 * 
 */
package org.store.book.pages;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.store.book.model.Cart;

/**
 * @author Uday Shankar
 * 
 */
public class CheckOut extends WebPage {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	public CheckOut() {
		this(null, null);
	}

	/**
	 * @param parameters
	 */
	public CheckOut(PageParameters parameters, Cart cart) {
		super(parameters);

		if(!(cart == null)){
			add(new Label("bookCount", cart.getListOfBooks().size()));
			add(new Label("amount", cart.getTotalBillValue()));
			add(new Label("address", cart.getBillingAddress().getCity() + "-"
					+ cart.getBillingAddress().getZipCode()));
		}
		

	}
}
